home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: Alpha / Whiteline Alpha.iso / progtool / c / gcc / gcc258s.zoo / Makefile.st.hp < prev    next >
Encoding:
Makefile  |  1994-01-30  |  24.5 KB  |  655 lines

  1. # Makefile for GNU C NATIVE COMPILER for the atariST/TT series hosted
  2. #  on a HPUX host (tested only on a HP Snake running hpux 8.x)
  3. #  NOTE: requires alloca.c from the emacs dist.
  4. #
  5.  
  6. # Makefile for GNU C compiler.
  7. #   Copyright (C) 1987 Free Software Foundation, Inc.
  8.  
  9. #This file is part of GNU CC.
  10.  
  11. #GNU CC is distributed in the hope that it will be useful,
  12. #but WITHOUT ANY WARRANTY.  No author or distributor
  13. #accepts responsibility to anyone for the consequences of using it
  14. #or for whether it serves any particular purpose or works at all,
  15. #unless he says so in writing.  Refer to the GNU CC General Public
  16. #License for full details.
  17.  
  18. #Everyone is granted permission to copy, modify and redistribute
  19. #GNU CC, but only under the conditions described in the
  20. #GNU CC General Public License.   A copy of this license is
  21. #supposed to have been given to you along with GNU CC so you
  22. #can know your rights and responsibilities.  It should be in a
  23. #file named COPYING.  Among other things, the copyright notice
  24. #and this notice must be preserved on all copies.
  25.  
  26. .NOEXPORT: # This tells GNU Make version 3
  27.        # not to put all the variables in the environment.
  28.  
  29.  
  30. CROSSDIR = /share/gcc-cross/atari
  31. CROSSBIN = $(CROSSDIR)/bin
  32. CROSSLIB = $(CROSSDIR)/lib
  33. CROSSINC = $(CROSSDIR)/include
  34.  
  35. # BASEREL not yet supported. Howard has sent some diffs for baserel
  36. #         but they only work for gcc-cc1 and not gcc-cc1plus. since
  37. #      gcc-cc1plus shares most .o files with gcc-cc1, until that
  38. #         is resolved, baserel is unsupported.
  39. # BASEREL = -mbaserel -mpcrel
  40.  
  41. # ARCHFLAGS    if unset, the default is -m68000 that will work on all STs
  42. #            for the TT set -m68020 -m68881 for the falcon you probably
  43. #        only want -m68020 unless you have the optional co-proc.
  44. #
  45. #        note: the above applies only when you have not changed the
  46. #        TARGET_DEFAULT in tm-atari.h yourself. if you have changed
  47. #        the default then adjust as appro.
  48. # ARCHFLAGS = -m68020 -m68881
  49.  
  50. CC = $(CROSSBIN)/cgcc
  51. DFLAGS = -DCROSSDIR=\"\"
  52. CFLAGS = $(ARCHFLAGS) $(BASEREL) $(DFLAGS) -O2 -fomit-frame-pointer -I$(CROSSINC) -I./config -I. -Datarist=1
  53. LDFLAGS =  $(ARCHFLAGS) $(BASEREL)
  54.  
  55. # hosts cc
  56. HOSTCC=/bin/cc 
  57. HOSTCFLAGS = $(DFLAGS) -O +Obb1000 -DUSE_C_ALLOCA -DCROSSHPUX -I./config -I.
  58. HOSTLDFLAGS = -z
  59. HOSTALLOCA = /net/acae127/home/bammi/lib.hp-ux/alloca.o
  60. #MALLOC1 = /net/acae127/home/bammi/lib.hp-ux/malloc_new6.o
  61. MALLOC1 = 
  62.  
  63. # OLDCC should not be the GNU C compiler.
  64. OLDCC = cc
  65. BISON = bison
  66. BISONFLAGS=
  67. AR = ar
  68. SHELL = /bin/sh
  69.  
  70. bindir = 
  71. libdir = 
  72.  
  73. # These are what you would need on HPUX:
  74. # CFLAGS = -Wc,-Ns2000 -Wc,-Ne700
  75. # -g is desirable in CFLAGS, but a compiler bug in HPUX version 5
  76. # bites whenever tree.def, rtl.def or machmode.def is included
  77. # (ie., on every source file).
  78. # CCLIBFLAGS = -Wc,-Ns2000 -Wc,-Ne700
  79. # For CCLIBFLAGS you might want to specify the switch that
  80. # forces only 68000 instructions to be used.
  81.  
  82. # If you are making gcc for the first time, and if you are compiling it with
  83. # a non-gcc compiler, and if your system doesn't have a working alloca() in any
  84. # of the standard libraries (as is true for HP/UX or Genix),
  85. # then get alloca.c from GNU Emacs and un-comment the following line:
  86. # ALLOCA = alloca.o
  87.  
  88. # If your system has alloca() in /lib/libPW.a, un-comment the following line:
  89. # CLIB= -lPW
  90.   
  91. # If your system's malloc() routine fails for any reason (as it does on
  92. # certain versions of Genix), try getting the files
  93. # malloc.c and getpagesize.h from GNU Emacs and un-comment the following line:
  94. # MALLOC = malloc.o
  95.  
  96. # If you are running GCC on an Apollo, you will need this:
  97. # CFLAGS = -g -O -M 3000 -U__STDC__ -DSHORT_ENUM_BUG
  98.  
  99. # Change this to a null string if obstacks are installed in the
  100. # system library.
  101. OBSTACK=obstack.o
  102. OBSTACK1=obstack.oo
  103.  
  104. # Dependency on obstack, alloca, malloc or whatever library facilities
  105. # are not installed in the system libraries.
  106. LIBDEPS= $(OBSTACK)
  107. LIBDEPS1= $(OBSTACK1) $(HOSTALLOCA) $(MALLOC)
  108.  
  109. # How to link with both our special library facilities
  110. # and the system's installed libraries.
  111. LIBS = $(OBSTACK)
  112. LIBS1 = $(OBSTACK1) $(HOSTALLOCA) $(MALLOC) $(MALLOC1) $(CLIB)
  113.  
  114. DIR = ../gcc
  115.  
  116. # Object files of CC1.
  117. # Language-specific object files for C.
  118. C_OBJS = c-parse.o c-lang.o c-lex.o c-pragma.o \
  119.    c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
  120.  
  121. # Language-specific object files for Objectionable C.
  122. OBJC_OBJS = objc-parse.o objc-actions.o \
  123.    c-lex.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o
  124.  
  125. # Language-specific object files for C++.
  126. CPLUS_OBJS = cp-parse.o cp-decl.o cp-decl2.o \
  127.    cp-typeck.o cp-type2.o cp-tree.o cp-ptree.o \
  128.    cp-cvt.o cp-search.o cp-lex.o cp-gc.o cp-call.o \
  129.    cp-class.o cp-init.o cp-method.o cp-except.o \
  130.    cp-expr.o cp-pt.o cp-edsel.o cp-xref.o \
  131.    $(CPLUS_INPUT) cp-spew.o c-common.o cp-error.o cp-errfn.o
  132.  
  133. # Files specific to the C interpreter bytecode compiler(s).
  134. BC_OBJS = bc-emit.o bc-optab.o
  135.  
  136. # Language-independent object files.
  137. OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
  138.  function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \
  139.  rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o \
  140.  dbxout.o sdbout.o dwarfout.o xcoffout.o \
  141.  integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
  142.  regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
  143.  insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
  144.  insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
  145.  insn-attrtab.o aux-output.o getpwd.o convert.o $(EXTRA_OBJS)
  146.  
  147. GCC_PASSES=gcc cc1 cpp
  148.  
  149. # Files to be copied away after each stage in building.
  150. STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
  151.  insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
  152.  insn-attr.h insn-attrtab.c insn-opinit.c \
  153.  stamp-flags stamp-config stamp-codes \
  154.  stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
  155.  stamp-attr stamp-attrtab stamp-opinit stamp-proto \
  156.  genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
  157.  genattrtab genattr genopinit \
  158.  bc-arity.h bc-opcode.h bc-opname.h \
  159.  stamp-bcarity stamp-bcopcode stamp-bcopname \
  160.  bi-arity bi-opcode bi-opname \
  161.  $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross cccp g++ g++-cross \
  162.  cc1plus cc1obj enquire protoize unprotoize specs collect2 $(USE_COLLECT2)
  163.  
  164. # Header files that are made available to programs compiled with gcc.
  165. USER_H = stddef.h stdarg.h assert.h va-*.h limits.h
  166.  
  167. # If you want to recompile everything, just do rm *.o.
  168. # CONFIG_H = config.h tm.h
  169. CONFIG_H =
  170. RTL_H = rtl.h rtl.def machmode.h machmode.def
  171. TREE_H = tree.h real.h tree.def machmode.h machmode.def
  172. CPLUS_TREE_H = $(TREE_H) cp-tree.h cp-tree.def
  173. BYTECODE_H = bytecode.h bc-emit.h bc-optab.h
  174.  
  175. ALL =  gcc.ttp gcc-cc1.ttp gcc-cpp.ttp gcc-cc1plus.ttp
  176.  
  177. all : $(ALL)
  178.  
  179. compilations: ${OBJS}
  180.  
  181. gcc.ttp: gcc.o version.o $(LIBDEPS)
  182.     $(CC) $(CFLAGS) $(LDFLAGS) -o gcc.ttp gcc.o version.o $(LIBS)
  183.  
  184. gcc.o: gcc.c $(CONFIG_H)
  185.     $(CC) $(CFLAGS) -DDEFAULT_TARGET_MACHINE=\"atariST\" -c gcc.c
  186.  
  187. gcc-cc1.ttp: $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  188.     $(CC) $(CFLAGS) $(LDFLAGS) -o gcc-cc1.ttp $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  189.  
  190. gcc-cc1plus.ttp: $(CPLUS_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  191.     $(CC) $(CFLAGS) $(LDFLAGS) -o gcc-cc1plus.ttp $(CPLUS_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  192.  
  193. gcc-cc1o.ttp: $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  194.     $(CC) $(CFLAGS) $(LDFLAGS) -o gcc-cc1o.ttp $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  195.  
  196. # C-language specific files.
  197.  
  198. c-parse.o : c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h input.h flags.h
  199.     $(CC) $(CFLAGS) -c c-parse.c
  200. c-parse.c c-parse.h: c-parse.y
  201.     @echo expect 29 shift/reduce conflicts and 14 reduce/reduce conflicts
  202.     $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
  203.  
  204. c-parse.y: c-parse.in 
  205.     sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
  206.       -e "/^ifc$$/d" -e "/^end ifc$$/d" \
  207.       ./c-parse.in > ./c-parse.y
  208.  
  209. c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
  210. c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
  211. c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H)
  212. c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h c-parse.h \
  213.     input.h flags.h
  214. c-aux-info.o : c-aux-info.c  $(CONFIG_H) $(TREE_H) c-tree.h flags.h
  215. c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
  216. c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h
  217.  
  218. # C++ language specific files.
  219.  
  220. cp-parse.o : cp-parse.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h cp-lex.h
  221.     $(CC) -c $(CFLAGS) cp-parse.c
  222.  
  223. cp-parse.c cp-parse.h : cp-parse.y
  224.     @echo expect 30 shift/reduce conflicts and 14 reduce/reduce conflicts
  225.     $(BISON) $(BISONFLAGS) -d -o cp-parse.c cp-parse.y
  226.     grep '^#define[     ]*YYEMPTY' cp-parse.c >>cp-parse.h
  227.  
  228. cp-spew.o : cp-spew.c $(CONFIG_H) $(CPLUS_TREE_H) \
  229.    cp-parse.h flags.h
  230. cp-lex.o : cp-lex.c $(CONFIG_H) $(CPLUS_TREE_H) \
  231.    cp-parse.h cp-input.c flags.h
  232. cp-decl.o : cp-decl.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
  233.   cp-lex.h cp-decl.h stack.h
  234. cp-decl2.o : cp-decl2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
  235.   cp-lex.h cp-decl.h
  236. cp-type2.o : cp-type2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  237. cp-typeck.o : cp-typeck.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  238. cp-class.o : cp-class.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h \
  239.     cp-class.h flags.h
  240. cp-call.o : cp-call.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h cp-class.h \
  241.     flags.h
  242. cp-init.o : cp-init.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  243. cp-method.o : cp-method.c $(CONFIG_H) $(CPLUS_TREE_H)
  244. cp-cvt.o : cp-cvt.c $(CONFIG_H) $(CPLUS_TREE_H)
  245. cp-search.o : cp-search.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
  246. cp-tree.o : cp-tree.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  247. cp-ptree.o : cp-ptree.c $(CONFIG_H) $(CPLUS_TREE_H)
  248. cp-gc.o : cp-gc.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  249. cp-except.o : cp-except.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  250. cp-expr.o : cp-expr.c $(CONFIG_H) $(CPLUS_TREE_H) $(RTL_H) flags.h \
  251.   expr.h insn-codes.h
  252. cp-edsel.o : cp-edsel.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
  253. cp-xref.o : cp-xref.c $(CONFIG_H) $(CPLUS_TREE_H)
  254. cp-pt.o : cp-pt.c $(CONFIG_H) $(CPLUS_TREE_H) cp-decl.h cp-parse.h
  255. cp-error.o : cp-error.c $(CONFIG_H) $(CPLUS_TREE_H)
  256. cp-errfn.o : cp-errfn.c $(CONFIG_H) $(CPLUS_TREE_H)
  257.  
  258. # Objectionable C language specific files.
  259.  
  260. objc-parse.o : objc-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
  261.    c-tree.h input.h flags.h objc-actions.h
  262.     $(CC) $(CFLAGS) -c objc-parse.c
  263. objc-parse.c : objc-parse.y
  264.     $(BISON) $(BISONFLAGS) objc-parse.y -o objc-parse.c
  265.  
  266. objc-actions.o : objc-actions.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h \
  267.    flags.h objc-actions.h
  268.  
  269. # A file used by all variants of C.
  270.  
  271. c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
  272.  
  273.  
  274. # Language-independent files.
  275. dumpvers: dumpvers.c
  276.  
  277. version.o: version.c
  278. obstack.o: obstack.c
  279.  
  280. tree.o : tree.c $(CONFIG_H) $(TREE_H) gvarargs.h flags.h function.h
  281. print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
  282. stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) function.h
  283. fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h 
  284. toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h input.h \
  285.  insn-attr.h xcoffout.h
  286.  
  287. rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
  288.  
  289. print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H)
  290. rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
  291.  
  292. toplev.o: bytecode.h bc-emit.h
  293. varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h \
  294.    defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h bytecode.h
  295. function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  296.    insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
  297.    recog.h output.h bytecode.h
  298. stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  299.    insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h \
  300.    recog.h bytecode.h bc-typecd.h bc-typecd.def bc-opcode.h bc-optab.h \
  301.    bc-emit.h
  302. expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) gvarargs.h flags.h function.h  \
  303.    insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h \
  304.    typeclass.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
  305.    bc-emit.h modemap.def
  306. calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
  307.    insn-flags.h
  308. expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  309.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
  310. explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
  311.    insn-config.h expr.h recog.h insn-flags.h insn-codes.h
  312. optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  313.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h
  314. dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \
  315.    insn-config.h reload.h gstab.h xcoffout.h
  316. sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) gsyms.h flags.h \
  317.    insn-config.h reload.h
  318. dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
  319.    insn-config.h reload.h output.h
  320. xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
  321. emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) flags.h gvarargs.h function.h  \
  322.    regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h bc-opcode.h \
  323.    bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h
  324. real.o : real.c $(CONFIG_H) $(TREE_H)
  325. getpwd.o : getpwd.c $(CONFIG_H)
  326.  
  327. integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
  328.    insn-flags.h insn-config.h insn-codes.h expr.h real.h function.h \
  329.    bytecode.h
  330.  
  331. jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
  332.    insn-config.h insn-flags.h insn-codes.h expr.h real.h
  333. stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
  334.  
  335. cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
  336.    insn-config.h recog.h
  337. loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
  338.    insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
  339. unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
  340.    integrate.h regs.h flags.h expr.h loop.h
  341. flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
  342.    basic-block.h regs.h hard-reg-set.h output.h
  343. combine.o : combine.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h  \
  344.    insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
  345.    basic-block.h recog.h real.h
  346. regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
  347.    basic-block.h regs.h insn-config.h recog.h reload.h real.h bytecode.h
  348. local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h \
  349.    regs.h hard-reg-set.h insn-config.h recog.h output.h
  350. global.o : global.c $(CONFIG_H) $(RTL_H) flags.h  \
  351.    basic-block.h regs.h hard-reg-set.h insn-config.h output.h
  352.  
  353. reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h \
  354.    reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
  355. reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h expr.h \
  356.    reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
  357.    basic-block.h recog.h output.h
  358. caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
  359.    regs.h hard-reg-set.h insn-config.h basic-block.h recog.h reload.h expr.h
  360. reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
  361.    basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
  362.    flags.h output.h
  363. sched.o : sched.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h \
  364.    flags.h insn-config.h insn-attr.h
  365. final.o : final.c $(CONFIG_H) $(RTL_H) $(TREE_H) gvarargs.h flags.h regs.h \
  366.    recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
  367.    hard-reg-set.h insn-codes.h gstab.h xcoffout.h
  368. recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
  369.    regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
  370.    insn-flags.h insn-codes.h real.h
  371. reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
  372.    regs.h hard-reg-set.h flags.h insn-config.h
  373.    
  374. aux-output.o : aux-output.c $(CONFIG_H) \
  375.    $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
  376.    insn-flags.h output.h insn-attr.h insn-codes.h
  377.  
  378.  
  379. # Now the source files that are generated from the machine description.
  380.  
  381. .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
  382.   insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
  383.   insn-attr.h insn-attrtab.c
  384.  
  385. insn-config.h : md genconfig
  386.     ./genconfig md > tmp-insn-config.h
  387.     ./move-if-change tmp-insn-config.h insn-config.h
  388.  
  389. insn-flags.h : md genflags
  390.     ./genflags md > tmp-insn-flags.h
  391.     ./move-if-change tmp-insn-flags.h insn-flags.h
  392.  
  393. insn-codes.h : md gencodes
  394.     ./gencodes md > tmp-insn-codes.h
  395.     ./move-if-change tmp-insn-codes.h insn-codes.h
  396.  
  397. insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h insn-config.h
  398.     $(CC) $(CFLAGS) -c insn-emit.c
  399.  
  400. insn-emit.c : md genemit
  401.     ./genemit md > tmp-insn-emit.c
  402.     ./move-if-change tmp-insn-emit.c insn-emit.c
  403.  
  404. insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h
  405.     $(CC) $(CFLAGS) -c insn-recog.c
  406.  
  407. insn-recog.c : md genrecog
  408.     ./genrecog md > tmp-insn-recog.c
  409.     ./move-if-change tmp-insn-recog.c insn-recog.c
  410.  
  411. insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
  412.   insn-config.h flags.h rtl.h recog.h expr.h reload.h
  413.     $(CC) $(CFLAGS) -c insn-opinit.c
  414.  
  415. insn-opinit.c: md genopinit
  416.     ./genopinit md > tmp-opinit.c
  417.     ./move-if-change tmp-opinit.c insn-opinit.c
  418.  
  419. insn-extract.o : insn-extract.c $(RTL_H)
  420.     $(CC) $(CFLAGS) -c insn-extract.c
  421.  
  422. insn-extract.c : md genextract
  423.     ./genextract md > tmp-insn-extract.c
  424.     ./move-if-change tmp-insn-extract.c insn-extract.c
  425.  
  426. insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h
  427.     $(CC) $(CFLAGS) -c insn-peep.c
  428.  
  429. insn-peep.c : md genpeep
  430.     ./genpeep md > tmp-insn-peep.c
  431.     ./move-if-change tmp-insn-peep.c insn-peep.c
  432.  
  433. insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h insn-config.h insn-flags.h conditions.h output.h aux-output.c
  434.     $(CC) $(CFLAGS) -c insn-output.c
  435.  
  436. insn-output.c : md genoutput
  437.     ./genoutput md > tmp-insn-output.c
  438.     ./move-if-change tmp-insn-output.c insn-output.c
  439.  
  440. insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
  441.      insn-attr.h insn-config.h
  442.     $(CC) $(CFLAGS) -c insn-attrtab.c
  443.  
  444. insn-attr.h: md genattr
  445.     ./genattr md > tmp-attr.h
  446.     ./move-if-change tmp-attr.h insn-attr.h
  447.  
  448. insn-attrtab.c: md genattrtab
  449.     ./genattrtab md > tmp-attrtab.c
  450.     ./move-if-change tmp-attrtab.c insn-attrtab.c
  451.  
  452.  
  453. # Now the programs that generate those files.
  454.  
  455. genconfig : genconfig.oo rtl.oo $(LIBDEPS1)
  456.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o genconfig genconfig.oo rtl.oo $(LIBS1)
  457.  
  458. genconfig.oo : genconfig.c $(RTL_H)
  459.     $(HOSTCC) $(HOSTCFLAGS) -c genconfig.c -o genconfig.oo
  460.  
  461. genflags : genflags.oo rtl.oo $(LIBDEPS1)
  462.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o genflags genflags.oo rtl.oo $(LIBS1)
  463.  
  464. genflags.oo : genflags.c $(RTL_H)
  465.     $(HOSTCC) $(HOSTCFLAGS) -c genflags.c -o genflags.oo
  466.  
  467. gencodes : gencodes.oo rtl.oo $(LIBDEPS1)
  468.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o gencodes gencodes.oo rtl.oo $(LIBS1)
  469.  
  470. gencodes.oo : gencodes.c $(RTL_H)
  471.     $(HOSTCC) $(HOSTCFLAGS) -c gencodes.c -o gencodes.oo
  472.  
  473. genemit : genemit.oo rtl.oo $(LIBDEPS1)
  474.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o genemit genemit.oo rtl.oo $(LIBS1)
  475.  
  476. genemit.oo : genemit.c $(RTL_H)
  477.     $(HOSTCC) $(HOSTCFLAGS) -c genemit.c -o genemit.oo
  478.  
  479. genopinit : genopinit.oo rtl.oo $(LIBDEPS1)
  480.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o genopinit genopinit.oo rtl.oo $(LIBS1)
  481.  
  482. genopinit.oo : genopinit.c $(RTL_H)
  483.     $(HOSTCC) $(HOSTCFLAGS) -c genopinit.c -o genopinit.oo
  484.  
  485. genrecog : genrecog.oo rtl.oo $(LIBDEPS1)
  486.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o genrecog genrecog.oo rtl.oo $(LIBS1)
  487.  
  488. genrecog.oo : genrecog.c $(RTL_H)
  489.     $(HOSTCC) $(HOSTCFLAGS) -c genrecog.c -o genrecog.oo
  490.  
  491. genextract : genextract.oo rtl.oo $(LIBDEPS1)
  492.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o genextract genextract.oo rtl.oo $(LIBS1)
  493.  
  494. genextract.oo : genextract.c $(RTL_H)
  495.     $(HOSTCC) $(HOSTCFLAGS) -c genextract.c -o genextract.oo
  496.  
  497. genpeep : genpeep.oo rtl.oo $(LIBDEPS1)
  498.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o genpeep genpeep.oo rtl.oo $(LIBS1)
  499.  
  500. genpeep.oo : genpeep.c $(RTL_H)
  501.     $(HOSTCC) $(HOSTCFLAGS) -c genpeep.c -o genpeep.oo
  502.  
  503. genoutput : genoutput.oo rtl.oo $(LIBDEPS1)
  504.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o genoutput genoutput.oo rtl.oo $(LIBS1)
  505.  
  506. genoutput.oo : genoutput.c $(RTL_H)
  507.     $(HOSTCC) $(HOSTCFLAGS) -c genoutput.c -o genoutput.oo
  508.  
  509. genattr : genattr.oo rtl.oo $(LIBDEPS1)
  510.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o genattr \
  511.      genattr.oo rtl.oo $(LIBS1)
  512.  
  513. genattr.oo : genattr.c $(RTL_H) config.h
  514.     $(HOSTCC) -c $(HOSTCFLAGS) genattr.c -o genattr.oo
  515.  
  516. genattrtab : genattrtab.oo rtl.oo rtlanal.oo $(LIBDEPS1)
  517.     $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o genattrtab \
  518.      genattrtab.oo rtl.oo rtlanal.oo $(LIBS1)
  519.  
  520. genattrtab.oo : genattrtab.c $(RTL_H) config.h insn-config.h
  521.     $(HOSTCC) -c $(HOSTCFLAGS) genattrtab.c -o genattrtab.oo
  522.  
  523. rtl.oo : rtl.c $(CONFIG_H) $(RTL_H)
  524.     $(HOSTCC) $(HOSTCFLAGS) -c rtl.c -o rtl.oo
  525.  
  526. rtlanal.oo : rtlanal.c $(CONFIG_H) $(RTL_H)
  527.     $(HOSTCC) $(HOSTCFLAGS) -c rtlanal.c -o rtlanal.oo
  528.  
  529. obstack.oo : obstack.c
  530.     $(HOSTCC) $(HOSTCFLAGS) -c obstack.c -o obstack.oo
  531.  
  532. # Remake bytecode files.
  533. # BI_ALL=bi-run.o
  534. BI_ALL=
  535. BC_ALL=bc-opname.h bc-opcode.h bc-arity.h
  536. BI_OBJ=bi-parser.oo bi-lexer.oo bi-reverse.oo
  537.  
  538.  
  539. bc-emit.o : bc-emit.c $(CONFIG_H) $(RTL_H) real.h $(BYTECODE_H) \
  540.      bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h
  541. bc-optab.o : bc-optab.c $(CONFIG_H) $(REAL_H) $(BYTECODE_H) \
  542.         bc-opcode.h bc-typecd.h bc-typecd.def
  543.  
  544. bi-run.o:    $(srcdir)/bi-run.c $(srcdir)/bi-run.h $(srcdir)/bc-typecd.h \
  545.   bc-opname.h bc-arity.h bc-opcode.h
  546.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/bi-run.c
  547.  
  548. HOST_CC = $(HOSTCC)
  549. HOST_CFLAGS = $(HOSTCFLAGS)
  550. HOST_LDFLAGS = $(HOSTLDFLAGS)
  551. HOST_LIBDEPS = $(LIBDEPS1)
  552. HOST_LIBS = $(LIBS1)
  553. srcdir = .
  554.  
  555. bytecode: $(BI_ALL) $(BC_ALL)
  556.  
  557. bi-arity: bi-arity.oo $(BI_OBJ) $(HOST_LIBDEPS)
  558.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-arity \
  559.      bi-arity.oo $(BI_OBJ) $(HOST_LIBS)
  560. bi-opcode: bi-opcode.oo $(BI_OBJ) $(HOST_LIBDEPS)
  561.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-opcode \
  562.      bi-opcode.oo $(BI_OBJ) $(HOST_LIBS)
  563. bi-opname: bi-opname.oo $(BI_OBJ) $(HOST_LIBDEPS)
  564.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-opname \
  565.      bi-opname.oo $(BI_OBJ) $(HOST_LIBS)
  566.  
  567. $(srcdir)/bi-parser.c $(srcdir)/bi-parser.h: $(srcdir)/bi-parser.y
  568.     cd $(srcdir); $(BISON) $(BISONFLAGS) -d bi-parser.y -o bi-parser.c
  569. bi-parser.oo:    $(srcdir)/bi-parser.c $(srcdir)/bi-defs.h hconfig.h
  570.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  571.        $(srcdir)/bi-parser.c -o bi-parser.oo
  572. bi-lexer.oo:    $(srcdir)/bi-lexer.c $(srcdir)/bi-parser.h hconfig.h
  573.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  574.        $(srcdir)/bi-lexer.c -o bi-lexer.oo
  575. bi-arity.oo: bi-arity.c $(srcdir)/bi-defs.h hconfig.h
  576.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  577.        $(srcdir)/bi-arity.c -o bi-arity.oo
  578. bi-opcode.oo: bi-opcode.c $(srcdir)/bi-defs.h hconfig.h
  579.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  580.        $(srcdir)/bi-opcode.c -o bi-opcode.oo
  581. bi-opname.oo: bi-opname.c $(srcdir)/bi-defs.h hconfig.h
  582.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  583.        $(srcdir)/bi-opname.c -o bi-opname.oo
  584. bi-reverse.oo: bi-reverse.c $(srcdir)/bi-defs.h
  585.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  586.        $(srcdir)/bi-reverse.c -o bi-reverse.oo
  587.  
  588.  
  589. bc-arity.h: stamp-bcarity ; @true
  590. stamp-bcarity : $(srcdir)/bytecode.def bi-arity $(srcdir)/move-if-change
  591.     ./bi-arity < $(srcdir)/bytecode.def >tmp-bc-arity.h
  592.     $(srcdir)/move-if-change tmp-bc-arity.h bc-arity.h
  593.     touch stamp-bcarity
  594.  
  595. bc-opcode.h: stamp-bcopcode ; @true
  596. stamp-bcopcode : $(srcdir)/bytecode.def bi-opcode $(srcdir)/move-if-change
  597.     ./bi-opcode < $(srcdir)/bytecode.def >tmp-bcopcd.h
  598.     $(srcdir)/move-if-change tmp-bcopcd.h bc-opcode.h
  599.     touch stamp-bcopcode
  600.  
  601. bc-opname.h: stamp-bcopname ; @true
  602. stamp-bcopname : $(srcdir)/bytecode.def bi-opname $(srcdir)/move-if-change
  603.     ./bi-opname < $(srcdir)/bytecode.def >tmp-bcopnm.h
  604.     $(srcdir)/move-if-change tmp-bcopnm.h bc-opname.h
  605.     touch stamp-bcopname
  606.  
  607. bytecode.mostlyclean:
  608.     -rm -f bc-arity.h bc-opcode.h bc-opname.h
  609.  
  610. bytecode.distclean bytecode.clean:    bytecode.mostlyclean
  611.     -rm -f bi-arity bi-opcode bi-opname bi-lexer
  612.  
  613. bytecode.realclean: bytecode.clean
  614.     -rm -f bi-parser.c bi-parser.h
  615.  
  616.  
  617.  
  618. # Making the preprocessor
  619. gcc-cpp.ttp: cccp
  620.     -rm -f gcc-cpp.ttp
  621.     ln cccp gcc-cpp.ttp
  622.  
  623. cccp: cccp.o cexp.o version.o $(LIBDEPS)
  624.     $(CC) $(CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
  625. cexp.o: cexp.c
  626. cexp.c: cexp.y
  627.     $(BISON) cexp.y
  628.     mv cexp.tab.c cexp.c
  629. cccp.o: cccp.c
  630.  
  631. # gnulib is not deleted because deleting it would be inconvenient
  632. # for most uses of this target.
  633. clean: bytecode.clean
  634.     -rm -f *.o *.oo $(STAGESTUFF)
  635.     -rm -f *.s *.s[0-9] *.co *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
  636.  
  637. # Get rid of every file that's generated from some other file (except INSTALL).
  638. realclean: clean bytecode.realclean
  639.     -rm -f $(ALL)
  640.     -rm -f cpp.aux cpp.cps cpp.fns cpp.info cpp.kys cpp.pgs cpp.tps cpp.vrs
  641.     -rm -f errs gnulib TAGS 
  642.     -rm -f core report
  643.     -rm -f internals internals-* internals.?? internals.??s
  644.  
  645. # Copy the files into directories where they will be run.
  646. #install: all
  647. #    install cc1 $(libdir)/gcc-cc1
  648. #    install cpp $(libdir)/gcc-cpp
  649. #    install gcc $(bindir)
  650.  
  651. force:
  652.  
  653. #In GNU Make, ignore whether `stage*' exists.
  654. .PHONY: clean realclean
  655.